package api

import (
	"github.com/gogf/gf/net/ghttp"
    "webserver/library/utils"
)

var Hello = helloApi{}

type helloApi struct {}

// Index is a demonstration route handler for output "Hello World!".
func (*helloApi) Index(r *ghttp.Request) {
	r.Response.Writeln("Hello World!")
}

func (*helloApi) MailDemo(r *ghttp.Request) {
    err := utils.MailExample()
    if err != nil {
        r.Response.Writeln(err.Error())
    } else {
        r.Response.Writeln("Success!")
    }
}
